# SPDX-License-Identifier: LGPL-3.0-or-later
# 
# SPDX-FileCopyrightText: 2015 Sebastian Rettenberger <rettenbs@in.tum.de>

##### Files #####
# Simple
set( SimpleF90Sources
	simple.f90
	${CMAKE_SOURCE_DIR}/include/asagi.f90 )

# Buf
set( BufF90Sources
	buf.f90
	${CMAKE_SOURCE_DIR}/include/asagi.f90 )

# Add MPI header files to the include path
include_directories( SYSTEM ${MPI_Fortran_INCLUDE_PATH} )

##### Executables #####
# Simple
add_executable( f90_simple
	${SimpleF90Sources} )
target_link_libraries( f90_simple
	${asagiTarget} ${asagiLibs}
	${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES} )
set_target_properties( f90_simple PROPERTIES
	LINKER_LANGUAGE Fortran
	OUTPUT_NAME simple )

# Buf
add_executable( f90_buf
	${BufF90Sources} )
target_link_libraries( f90_buf
	${asagiTarget} ${asagiLibs}
	${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES} )
set_target_properties( f90_buf PROPERTIES
	LINKER_LANGUAGE Fortran
	OUTPUT_NAME buf )
